// ConnectServer.cpp : implementation file
//

#include "stdafx.h"
#include "TrojCLient.h"
#include "ConnectServer.h"
#include "afxdialogex.h"


// CConnectServer dialog

IMPLEMENT_DYNAMIC(CConnectServer, CDialog)

CConnectServer::CConnectServer(CWnd* pParent /*=NULL*/)
	: CDialog(CConnectServer::IDD, pParent)
	, m_addr(_T(""))
{

}

CConnectServer::~CConnectServer()
{
}

void CConnectServer::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_EDIT_SERVER_IP, m_ServerIP);
}


BEGIN_MESSAGE_MAP(CConnectServer, CDialog)
	ON_BN_CLICKED(IDOK, &CConnectServer::OnBnClickedOk)
END_MESSAGE_MAP()


// CConnectServer message handlers


void CConnectServer::OnBnClickedOk()
{
	// TODO: Add your control notification handler code here
	UpdateData(true);
	GetDlgItem(IDC_EDIT_SERVER_IP)->GetWindowText(m_addr);
	CDialog::OnOK();
}


BOOL CConnectServer::OnInitDialog()
{
	CDialog::OnInitDialog();

	// TODO:  Add extra initialization here
	GetDlgItem(IDC_EDIT_SERVER_IP)->SetWindowText(_T("127.0.0.1"));

	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}
